package sourcecode.spring.service;

import com.code.spring.spring.*;

@Component()
//@Scope("prototype")
public class UserService implements BeanNameAware, InitializingBean, UserInterface {

    @Autowired
    private OrderService orderService;

    private String beanName;
    @Override
    public void setBeanName(String beanName) {
        this.beanName = beanName;
    }

    private String userAge;
    @Override
    public void afterPropertiesSet() {
        // ...
        this.userAge = "10";
        System.out.println("初始化age");
    }

    @Override
    public void test() {
        System.out.println(orderService);
    }


}
